﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SimpleBlog.Mvc;

namespace SimpleBlog.Helpers
{
    public static class TitleHelper
    {
        public static string GetTtile<T>(this BlogViewPage<T> page, string section)
        {
            if (string.IsNullOrWhiteSpace(section))
                return page.Config.BlogTitle;
            return string.Format("{0} - {1}", section, page.Config.BlogTitle);
        }
    }
}